package encrypt

import (
	"crypto/sha1"
	"io"
	"fmt"
)

// Sha1Encypt SHA1摘要
func Sha1Encypt(plaintext string) string {
	h := sha1.New()
	io.WriteString(h, plaintext)
	cipher := fmt.Sprintf("%x", h.Sum(nil))
	h.Reset()
	return cipher
}
